import request from '@/utils/request'

export function getIssued(params) {
  return request({
    url: '/portal/level/page',
    method: 'get',
    params
  })
}

export function getIssuedList(params) {
  return request({
    url: '/portal/level/list',
    method: 'get',
    params
  })
}

export function addIssued(data) {
  return request({
    url: '/portal/level',
    method: 'post',
    data
  })
}

export function editIssued(data) {
  return request({
    url: '/portal/level',
    method: 'put',
    data
  })
}

export function delIssued(id) {
  return request({
    url: `/portal/level/${id}`,
    method: 'delete'
  })
}

export function getAlert(params) {
  return request({
    url: `/portal/warning/page`,
    method: 'get',
    params
  })
}

export function addAlert(data) {
  return request({
    url: `/portal/warning`,
    method: 'post',
    data
  })
}

export function editAlert(data) {
  return request({
    url: `/portal/warning`,
    method: 'put',
    data
  })
}

export function delAlert(id) {
  return request({
    url: `/portal/warning/${id}`,
    method: 'delete'
  })
}
